/**
 * 会议室相关 WebSocket 事件处理器
 */
const handleRoomStatusUpdated = (io, socket) => {
  socket.on('server:room-status-updated', async ({ roomId, status }) => {
    console.log(`[WebSocket] 发送会议室状态更新通知，会议室ID=${roomId}，状态=${status}`);
    io.emit('client:room-status-updated', { roomId, status });
  });
};

const handleRoomDeleted = (io, socket) => {
  socket.on('server:room-deleted', async ({ roomId, message }) => {
    console.log(`[WebSocket] 发送会议室删除通知，会议室ID=${roomId}`);
    io.emit('client:room-deleted', { roomId, message });
  });
};

module.exports = {
  handleRoomStatusUpdated,
  handleRoomDeleted,
};